package com.cos.mp.lession69.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author: COS
 * @time: 2021/11/18 14:38
 * @description:
 */
@TableName
@ToString
public class Emp implements Serializable {
    private int eno;
    private String ename;
    private String esex;
    private double salary;
    private String pwd;
    private int dno;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField(value = "bornDate")
    private Date bornDate;
    private String phone;

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Emp(String ename, String esex, double salary, String pwd, int dno, Date bornDate, String phone) {
        this.ename = ename;
        this.esex = esex;
        this.salary = salary;
        this.pwd = pwd;
        this.dno = dno;
        this.bornDate = bornDate;
        this.phone = phone;
    }

    public Emp(int eno, String ename, String esex, double salary, String pwd, int dno, Date bornDate, String phone) {
        this.eno = eno;
        this.ename = ename;
        this.esex = esex;
        this.salary = salary;
        this.pwd = pwd;
        this.dno = dno;
        this.bornDate = bornDate;
        this.phone = phone;
    }

    public Emp() {
    }

    public Emp(String ename, String esex, double salary, String pwd, int dno, Date bornDate) {
        this.ename = ename;
        this.esex = esex;
        this.salary = salary;
        this.pwd = pwd;
        this.dno = dno;
        this.bornDate = bornDate;
    }

    public Emp(int eno, String ename, String esex, double salary, String pwd, int dno, Date bornDate) {
        this.eno = eno;
        this.ename = ename;
        this.esex = esex;
        this.salary = salary;
        this.pwd = pwd;
        this.dno = dno;
        this.bornDate = bornDate;
    }

    public int getEno() {
        return eno;
    }

    public void setEno(int eno) {
        this.eno = eno;
    }

    public String getEname() {
        return ename;
    }

    public void setEname(String ename) {
        this.ename = ename;
    }

    public String getEsex() {
        return esex;
    }

    public void setEsex(String esex) {
        this.esex = esex;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public int getDno() {
        return dno;
    }

    public void setDno(int dno) {
        this.dno = dno;
    }

    public Date getBornDate() {
        return bornDate;
    }

    public void setBornDate(Date bornDate) {
        this.bornDate = bornDate;
    }
}
